<template>
    <div class="error-page">
        <div class="error-content">
            <div class="error-code">403</div>
            <div class="error-message">啊哦~ 你没有权限访问该页面哦</div>
            <div class="error-actions">
                <router-link to="/">
                    <el-button type="primary" size="large" class="action-btn primary-btn">
                        返回首页
                    </el-button>
                </router-link>
                <el-button size="large" class="action-btn secondary-btn" @click="goBack">
                    返回上一页
                </el-button>
            </div>
        </div>
    </div>
</template>

<script setup lang="ts" name="403">
import { useRouter } from 'vue-router';

const router = useRouter();
const goBack = () => {
    router.go(-1);
};
</script>

<style scoped>
.error-page {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    background: #f5f5f5;
    box-sizing: border-box;
    padding: 20px;
}

.error-content {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.error-code {
    font-size: 120px;
    font-weight: bold;
    color: #409eff;
    line-height: 1;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(64, 158, 255, 0.1);
}

.error-message {
    font-size: 18px;
    color: #666;
    margin-bottom: 50px;
    line-height: 1.5;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.action-btn {
    min-width: 120px;
    height: 44px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.primary-btn {
    background: #409eff;
    border-color: #409eff;
    color: #fff;
}

.primary-btn:hover {
    background: #66b1ff;
    border-color: #66b1ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
}

.secondary-btn {
    background: #fff;
    border: 1px solid #dcdfe6;
    color: #606266;
}

.secondary-btn:hover {
    background: #f5f7fa;
    border-color: #c0c4cc;
    color: #409eff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .error-page {
        padding: 10px;
    }
    
    .error-code {
        font-size: 80px;
        margin-bottom: 20px;
    }
    
    .error-message {
        font-size: 16px;
        margin-bottom: 40px;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .action-btn {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .error-code {
        font-size: 60px;
    }
    
    .error-message {
        font-size: 14px;
    }
}
</style>
